<?php
/**
 * Timfan design模块处理程序
 *
 * @author Tim Fan
 * QQ:1026073477
 * @url http://i-fanr.com/
 */
defined('IN_IA') or exit('Access Denied');

class Tim_bookModuleProcessor extends WeModuleProcessor {
	public $table_reply = 'tim_booksetting';
	public function respond() {
		$rid = $this->rule;
		$fromuser = $this->message['from'];
		if (!empty($rid)) {
			$reply = pdo_fetch("SELECT * FROM " . tablename($this->table_reply) . " WHERE rid = :rid", array(':rid' => $rid));
			if($reply) {
					$news = array();
					$news[] = array(
						'title' => $reply['title'],
						'description' =>$reply['tips'],
						'picurl' =>$reply['share_icon'],
						'url' => $this->createMobileUrl('main', array('book_id' => $reply['book_id'])),
					);
					return $this->respNews($news);
			}
		}
		return null;
	}
    
}